﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="frmCaixa.aspx.cs" Inherits="WebMotel.frmCaixa" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
  <script type="text/javascript">


      function load() {
          Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
      }

      function EndRequestHandler() {
          mask();
      }

      function mask() {

          $('#<%=txtCadastrar_VlrSaldo.ClientID %>').setMask('decimal');


      }
      $(document).ready(mask);

  
</script>

<style type="text/css">
      
      .div_legendaFlutuante
      {
            margin: 0;
            display:block;
            position:fixed;
            width:140px;
            height:130px;
            bottom: 0px;
            right:0px;
            color:#A1A1A1;
            z-index:100;
            background-color:transparent;
            text-align:right;
            font-weight:normal;
            /*border:1px solid #a1a1a1;*/
      }
        .modal
        {
            width: 100%;
            height: auto;
            float:left;
            top: 0;
            margin: 0;
            left: 0;
            margin-top:0px;
            display: none;
            z-index: 999;
            background: rgba(0,0,0,0.5);
            -webkit-animation-duration: 1s;
            -webkit-animation-name: fade;
            -webkit-animation-iteration-count: 1;
            -webkit-animation-direction: normal;
            visibility:inherit;  
        }
                
         .modal_inside
        {
            float:left;
            margin:10% 0px 0px 20%;            
            padding:0px 5px 5px 5px;
            
            
            width:60%;
            height:auto;
            
            background-color:#FFFFFF;
            -moz-border-radius:5px;
            webkit-border-radius:5px;
            border-radius: 5px;
            
            
            border:1px solid #CCCCCC;
            
            -moz-box-shadow:    0px 1px 3px 1px #1b1b1b;
            -webkit-box-shadow: 0px 1px 3px 1px #1b1b1b;
            box-shadow:         0px 1px 3px 1px #1b1b1b;
  
            <strong>behavior:url(border-radius.htc);</strong>
            
            
            
        }
        
        .modal a
        {
            display: block;
            vertical-align: middle;
            text-align: center;    
        }
        
        .modal img
        {
            padding: 5px 5px 45px 5px;
            background: #ffffff;
            -webkit-box-shadow: 0px 0px 15px #444;
            -moz-box-shadow: 0px 0px 15px #444;
            -webkit-animation-duration: 0.50s;
            -webkit-animation-name: grow;
            -webkit-animation-iteration-count: 1;
            -webkit-animation-direction: normal;
            -webkit-animation-timing-function: ease-in;
        }
        
        .hfCampoConfirmacao
        {
            color:White;    
        }
        
        .modal:target
        {
            display: table;
            height:100%;
        }
        
        #div_modal_conteudo
        {
            margin-top:155px;
            background-color: White;
            height:200px;
            width:400px;
            border: 3px solid #660000;
            -moz-border-radius: 10px;
            -webkit-border-radius: 10px;
            -webkit-box-shadow:0px 5px 5px #555;
            -moz-box-shadow:0px 5px 5px #555;
        }
        
        #botao_fechar_modal
        {
            text-align:center;
        }
    </style>


</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


          
            <div runat="server" id="divMensagem" class="mensagem">
                    <p runat="server" id="pMensagem"></p>
            </div>


            <!-- FORM ENCERRAR CAIXA -->

            <div id="div_EncerrarCaixa" class="modal FadeinModal">
                <div class="modal_inside">
                    <h3 class="header smaller lighter blue">
                        <i class="fa-plus-square bigger-125 icon-only"></i>
                         Encerrar Caixa
                         
                         <i class="icon-double-angle-right"></i> <asp:Label ID="lblEncerrar_CaixaUsuarioNome" runat="server" Text=""></asp:Label>
                         <asp:Label ID="lblEncerrar_CaixaID" runat="server" Text=""></asp:Label>
                    </h3>

                     <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                             <label for="id-date-picker-1">Data Hora Encerramento:</label>
                            <asp:TextBox ID="txtEncerrar_DtHoraEncerramento" class="ace-tooltip" runat="server" Width="140px" />
                        </div>             
                    </div>

                    <br clear="all" />
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                         <div style="float:left; height:auto; margin-right:10px;">
                            <a href="#" class="btn btn btn-small btn-prev" >
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </a>                          
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn btn-small btn-info" runat="server" ID="btnEncerrar_EncerrarCaixa" OnClick="btnEncerrar_EncerrarCaixa_OnClick"  >
                                <i class="icon-lock bigger-110"></i>
                                Encerrar Caixa
                           </asp:LinkButton>                            
                        </div>
                    </div>
                    <br clear="all" />
                    <hr />

                </div>
            </div>

        <!--  ENCERRAR CAIXA -->



    <div id="page-content" class="clearfix">
        <div class="page-header position-relative">
            <h1>
                Caixas
                <small>
                <i class="icon-double-angle-right"></i>
                    Utilize esta página para relaizar a pesquisa, alterar ou inserir novos Caixas.
                </small>
            </h1>
        </div>


        <div class="tabbable">
            <ul id="myTab" class="nav nav-tabs">
                <li class="active" id="li_pesquisar">
                    <a href="#div_pesquisar" data-toggle="tab">
                    <i class="green icon-search bigger-110"></i>
                        Pesquisar
                    </a>
                </li>
                <li class=""  id="li_editar">
                    <a href="#div_editar" data-toggle="tab">
                    <i class="green icon-edit bigger-110"></i>
                        Editar
                    </a>
                </li>
                 <li class="" id="li_cadastrar">
                    <a href="#div_cadastrar" data-toggle="tab">
                    <i class="green icon-save bigger-110"></i>
                        Novo
                    </a>
                </li>
            </ul>
            <div class="tab-content">

    <div id="div_pesquisar" class="tab-pane active" >           

        <div class="row-fluid">
            
            <h3 class="header smaller lighter grey">
            <i class="icon-search green"></i>
            Pesquisar
            </h3>

         
            <div style="float:left; width:100%; height:auto;">
                <div style="float:left; height:auto; margin-right:10px;">
                    <label class="control-label" for="txtPesquisar_ID">ID:</label>
                    <asp:TextBox ID="txtPesquisar_ID" class="ace-tooltip" runat="server" Width="60px" />
                </div>

                <div style="float:left; height:auto; margin-right:10px;">
                    <label class="control-label" for="txtPesquisar_Descricao">Descrição:</label>
                    <asp:TextBox ID="txtPesquisar_Descricao" class="ace-tooltip" runat="server" Width="360px" />
                </div>
                <div style="float:left; height:auto; margin-right:10px;">
                    <label class="control-label" for="txtPesquisar_Descricao">.</label>
                    <asp:LinkButton ID="btnPesquisar" runat="server" CssClass="btn btn-purple btn-small" OnClick="btnPesquisar_OnClick" >
                        <i class="icon-search icon-on-right bigger-110"></i>
                        Pesquisar
                    </asp:LinkButton>
                </div>
            </div>
        </div>


        <br clear="all" />
        <div class="row-fluid">
            <div class="table-header"> Resultado(s) para "Caixas" </div>
            
                <div id="table_report_wrapper" class="dataTables_wrapper" role="grid">
                    <asp:Repeater ID="rptListagem" runat="server" 
                        onitemdatabound="rptListagem_ItemDataBound">
                        <HeaderTemplate>
                             <table class="table table-striped table-bordered table-hover dataTable" id="table_report" aria-describedby="table_report_info">
								<thead>
									<tr role="row">
                                        <th class="sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 7%;" aria-label="Domain: activate to sort column ascending">
                                            ID
                                        </th>
                                        
                                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 20%;" aria-label="Status: activate to sort column ascending">
                                            Usuário
                                        </th>

                                        <th class="hidden-480 sorting" role="columnheader" tabindex="0" aria-controls="table_report" rowspan="1" colspan="1" style="width: 73%;" aria-label="Status: activate to sort column ascending">
                                            Data Hora Abertura
                                        </th>
                                        
                                        <th></th>
                                    </tr>
                               	</thead>								
							<tbody role="alert" aria-live="polite" aria-relevant="all">
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class='<%# Container.ItemIndex % 2 == 0 ? "odd" : "even" %>'>
							    <td class="">
								    <%# Eval("ID") %>
							    </td>
                                <td class="">
								    <%# Eval("Usuario") %>
							    </td>
                                 <td class="">
								    <%# Eval("dtAbertura") %>
							    </td>
                                <td class="td-actions ">
                                    <div class="hidden-phone visible-desktop btn-group">                                     
                                        <asp:LinkButton class="btn btn-mini btn-info" runat="server" ID="btnCarregaForm" ToolTip='<%# "Editar: " + Eval("dtAbertura") %>' CommandArgument='<%# Eval("ID") %>' OnClick="btnCarregaForm_OnClick" >
                                            <i class="icon-edit bigger-120"></i>
                                        </asp:LinkButton>

                                        <asp:LinkButton  runat="server" ID="btnEncerraCaixa" class="btn btn-mini btn-warning"  ToolTip='<%# "Encerrar Caixa: " + Eval("dtAbertura") %>' CommandArgument='<%# Eval("ID") %>' OnClick="btnEncerraCaixa_OnClick" PostBackUrl="#div_EncerrarCaixa" >
                                            <i runat="server" id="iconEcerrar" class="fa fa-unlock bigger-120"></i>
                                        </asp:LinkButton>

                                        <asp:LinkButton class="btn btn-mini btn-danger" runat="server" ID="btnExcluir" ToolTip='<%# "Excluir: " + Eval("dtAbertura") %>' CommandArgument='<%# Eval("ID") %>' OnClick="btnExcluir_OnClick" OnClientClick="javascript:return confirm('Deseja realmente excluir este registro?');" >
                                            <i class="icon-trash bigger-120"></i>
                                        </asp:LinkButton>
                                    </div>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                                </tbody>
                            </table>

                            <div class="row-fluid">
                                <div class="span6">
                                    <div class="dataTables_paginate paging_bootstrap pagination">
                                        <ul>
                                            <li class="prev">
                                              <asp:LinkButton ID="lnkAnterior" runat="server" OnClick="lnkAnterior_Click">
                                                    <i class="icon-double-angle-left"></i>
                                                </a>
                                            </asp:LinkButton>
                                             <li class="next">
                                                <asp:LinkButton ID="lnkProximo" runat="server" OnClick="lnkProximo_Click">
                                                    <i class="icon-double-angle-right"></i>
                                                </asp:LinkButton>
                                            </li>
                                        </ul>
                                    </div>
                                </div>
                            </div>
                        </FooterTemplate>
                    </asp:Repeater>
 

                </div>
        </div>

    </div>
    


                <!-- FORM EDITAR -->
                <div id="div_editar" class="tab-pane ">
                   <h3 class="header smaller lighter purple"> <i class="icon-edit purple"></i> Editar</h3>

                    <div style="float:left; width:100%; height:auto;">

                        <div style="float:left; width:100%; height:auto;">
                            <div style="float:left; height:auto; margin-right:10px;">
                                <label class="control-label" for="txtEditar_ID">ID:</label>
                                <asp:TextBox ID="txtEditar_ID" class="ace-tooltip grey" runat="server" Width="60px" ReadOnly="true" />
                                <asp:RequiredFieldValidator ID="RFV_txtEditar_ID" ControlToValidate="txtEditar_ID" runat="server" Display="None" ErrorMessage="Por favor, selecione um registro para alterar." ValidationGroup="alterar"></asp:RequiredFieldValidator>
                                <asp:ValidatorCalloutExtender ID="VCE_txtEditar_ID" runat="server" Enabled="True" TargetControlID="RFV_txtEditar_ID"> </asp:ValidatorCalloutExtender>              
                            </div>
                        </div>

                        <br clear="all" />

                        <div style="float:left; width:100%; height:auto;">
                            <div style="float:left; height:auto; margin-right:10px;">
                                <label class="control-label" for="txtEditar_Descricao">Descrição:</label>
                                <asp:TextBox ID="txtEditar_Descricao" class="ace-tooltip" runat="server" Width="660px" />
                                <asp:RequiredFieldValidator ID="RFV_txtEditar_Descricao" ControlToValidate="txtEditar_Descricao" runat="server" Display="None" ErrorMessage="Por favor, informe o campo Descrição." ValidationGroup="alterar"></asp:RequiredFieldValidator>
                                <asp:ValidatorCalloutExtender ID="VCEE_txtEditar_Descricao" runat="server" Enabled="True" TargetControlID="RFV_txtEditar_Descricao"> </asp:ValidatorCalloutExtender>              
                     
                            </div>
                        </div>

                    </div>

                    <br clear="all" />
                    
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-prev" runat="server" ID="btnEditarVoltar" OnClick="btnEditarVoltar_OnClick" CausesValidation="false">
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </asp:LinkButton>                            
                        </div>

                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-info" runat="server" ID="btnEditarSalvar" OnClick="btnEditarSalvar_OnClick" ValidationGroup="alterar">
                                <i class="icon-ok bigger-110"></i>
                                Salvar
                           </asp:LinkButton>                            
                        </div>
                    </div>
                </div>



                <!-- FORM NOVO -->
                <div id="div_cadastrar" class="tab-pane " >
                   <h3 class="header smaller lighter purple"> <i class="icon-save purple"></i> Novo</h3>

                    <div style="float:left; width:100%; height:auto;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label class="control-label" for="txtCadastrar_Descricao">Dt Abertura:</label>
                            <asp:TextBox ID="txtCadastrar_dtAbertura" class="ace-tooltip" runat="server" Width="140px" ReadOnly="true" />
                            <asp:RequiredFieldValidator ID="RFV_txtCadastrar_dtAbertura" ControlToValidate="txtCadastrar_dtAbertura" runat="server" Display="None" ErrorMessage="Por favor, informe o campo Dt. Abertura." ValidationGroup="cadastrar"></asp:RequiredFieldValidator>
                            <asp:ValidatorCalloutExtender ID="VCE_txtCadastrar_dtAbertura" runat="server" Enabled="True" TargetControlID="RFV_txtCadastrar_dtAbertura"> </asp:ValidatorCalloutExtender>              
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <label class="control-label" for="txtCadastrar_Descricao">Vlr Saldo:</label>
                            <asp:TextBox ID="txtCadastrar_VlrSaldo" class="ace-tooltip" runat="server" Width="100px" />
                            <asp:RequiredFieldValidator ID="RFV_txtCadastrar_VlrSaldo" ControlToValidate="txtCadastrar_VlrSaldo" runat="server" Display="None" ErrorMessage="Por favor, informe o campo Valor Saldo." ValidationGroup="cadastrar"></asp:RequiredFieldValidator>
                            <asp:ValidatorCalloutExtender ID="VCE_txtCadastrar_VlrSaldo" runat="server" Enabled="True" TargetControlID="RFV_txtCadastrar_VlrSaldo"> </asp:ValidatorCalloutExtender>              
                        </div>
                    </div>

                    <br clear="all" />
                    
                    <div style="float:left; width:100%; height:auto; margin:10px 0px 0px 0px;">
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-prev" runat="server" ID="btnCadastrarVoltar" OnClick="btnCadastrarVoltar_OnClick" CausesValidation="false">
                                <i class="icon-arrow-left"></i>
                                Voltar
                           </asp:LinkButton>                            
                        </div>
                        <div style="float:left; height:auto; margin-right:10px;">
                            <asp:LinkButton class="btn btn-info" runat="server" ID="btnCadastrarSalvar" OnClick="btnCadastrarSalvar_OnClick" ValidationGroup="cadastrar">
                                <i class="icon-save bigger-110"></i>
                                Cadastrar
                           </asp:LinkButton>                            
                        </div>
                    </div>
                </div>

                </div>
            </div>
        </div>
  

    

</asp:Content>
